  <?php 
    $top_nav=sp_get_menu_tree(1);
 ?>
  <link rel="stylesheet" rev="stylesheet" href="/themes/wnsc/Public/css/jock-citypicker-2.0.min.css" type="text/css" />
  <script>
      city={$city_settlesRes};
  </script>
  <script type="text/javascript" src="/themes/wnsc/Public/js/jock-citypicker-2.0.min.js"></script>
  <style>
     .city_active{background: #fff;box-shadow: 0 0 8px #ccc;border-bottom: 0px;z-index: 99999;line-height: 30px;padding: 0 5px;margin-top: 0;height: 30px;cursor: pointer;}
      #csoie{cursor: pointer;}
  </style>
  <!--  site-nav -->
    <div id="site-nav" class="site-nav" data-spm="102201">
        <div class="ju-wrapper" >
            <div class="menu-left"  >
                <span class="mobile" style="margin: 0;" id="city-choice">
                <php>$site_city=session('site_city');</php>
                 
                    <dt class="sc-icon">
                        <div class="sc-choie" id="csoie">
                            <i class="sc-icon-right"></i>
                            <span class="ui-areamini-text" id="test3">{$site_city}&nbsp;&nbsp;&nbsp;</span>
                        </div><div id="dd_spacer" style="position: relative;"></div>
                    </dt>
                    <script type="text/javascript">
                        window.onload = function(){
                            var c = document.getElementById("test3");
                            var fn2 = function(city){
                                c.value = city;
                            };
                            var dd_spacer = document.getElementById("dd_spacer");
                            var csoie=document.getElementById('csoie');
                            c.onclick = function(){
                               if(dd_spacer.innerHTML==''){
                                   citypicker.show({
                                       left : 0,
                                       top  :0,
                                       selected : fn2
                                   });
                                   csoie.setAttribute("class", "city_active");
                               }else{
                                   dd_spacer.innerHTML='';
                                   csoie.removeAttribute("class", "city_active");
                               }

                            };
                        }

                        </script>

           			</span>

            		<php>if($_SESSION['user_id']){</php>
                <span class="login-info">
                	<a class="user-nick" href="{:U('user/center')}" target="_top">{$_SESSION['user_name']}</a> 
                	<a  href="{:U('user/login_out')}" id="J_Logout">退出</a>
                </span>
               	<php>}</php>
            </div>
            <ul class="quick-menu">
            	<php>if($_SESSION['user_id']==null){</php>
                <li>
                    <a class="select" href="{:U('user/login')}" >
                        <i></i> 请登录
                    </a>
                </li>
                <li>
                    <a class="select" href="{:U('user/register')}" >
                        <i></i> 免费注册
                    </a>
                </li>
							<php>}</php>
                <li>
                    <a href="{:U('user/order')}" target="_blank">我的订单</a>
                </li>
              
                <li>
                    <a href="{:U('cart/cart_list')}" target="_blank">购物车</a>
                </li>
                <li>
                    <a href="http://store.58daiyan.com/" target="_blank">卖家中心</a>
                </li>
                <li>
                    <a href="javascript:;" onclick="addFavorite2()">加入收藏</a>
                </li>
            </ul>
        </div>
    </div>
    <script type="text/javascript">
    	function addFavorite2() {
		    var url = window.location;
		    var title = document.title;
		    var ua = navigator.userAgent.toLowerCase();
		    if (ua.indexOf("360se") > -1) {
		        alert("由于360浏览器功能限制，请按 Ctrl+D 手动收藏！");
		    }
		    else if (ua.indexOf("msie 8") > -1) {
		        window.external.AddToFavoritesBar(url, title); //IE8
		    }
		    else if (document.all) {
		  try{
		   window.external.addFavorite(url, title);
		  }catch(e){
		   alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
		  }
		    }
		    else if (window.sidebar) {
		        window.sidebar.addPanel(title, url, "");
		    }
		    else {
		  alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
		    }
		}
    </script>
    <!--  搜索 -->
    <div id="J_JuNav" class="ju-naver" data-spm="102202">
        <div class="ju-wrapper">
            <h1 class="logo mouseenter" id="J_logobox" style="background: url({:sp_getad('logo')}) center;">             
            <a target="_top" id="J_julogo" class="ju-logo ju-logo-show" href="/" title="58代言网"></a>                       
        </h1>
            <!--  navtitle   -->
            <div class="NavMenu_r">
                <div class="up">
                    <div>
                        <a href="/">
                            <img src="{:sp_getad('头部二维码')}" style="width: 204px;max-height: 106px;">
                        </a>
                    </div>
                    <div style="float: right;">
                        <div class="nav_left">
                        	<form action="{:U('search/index')}" method="get">
                        		<input type="text" placeholder="请输入关键词" id="search_Txt" name="keyword" value="{$keywords}" style="color: #000;padding-left: 10px;">
                            <input type="submit" value="搜 索" />
                          </form>
                        </div>
                        <div class="hot">
                        		<php>$web_search=explode(',',$web_search);	</php>
                        		<foreach name="web_search" item="v">
                        			<neq name="key" value="0">|</neq>
                        			<a href="{:U('search/index',array('keyword'=>$v))}">{$v}</a>
                        		</foreach>
                        </div>
                        <div class="txtMarquee-left">
                            <div class="bd">
                                <span style="position: absolute; font-weight:bold;"></span>
                                <div class="tempWrap" >
                                	<php>$daiyan=get_daiyan_list();</php>
                                    <ul class="infoList" >
                                    	<foreach name="daiyan" item="v">
                                        <li >
                                            <a href="{:U('shop/index',array('id'=>$v['goods_id']))}" target="_blank">
                                                <php> $v['username']=yc_phone($v['username']);</php>
                                                <span>{$v.username}</span>
                                                <span>代言了"{$v.goods_name}"，获得代言红包</span>
                                                <span >{$v.recommend_price}元</span>
                                            </a>
                                        </li>
                                      </foreach> 

                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <ul id="J_NavMenu" class="nav-menu">
                   <foreach name="top_nav" item="v"> 
                    <li class="menu-home">
                        <a target="_top" class="menu-link" href="{$v.href}">{$v.label}</a>
                    </li>
                    </foreach>
                    
                </ul>
            </div>

        </div>
    </div>